import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElIcons from '@element-plus/icons-vue'
import router from './components/router'
import ECharts from 'vue-echarts'; // 注意：这里使用的是 vue-echarts 库
import * as echarts from 'echarts'
import zhCn from 'element-plus/dist/locale/zh-cn';
import store from '../src/components/store/index.js'
const app = createApp(App)
app.use(ElementPlus, { locale: zhCn })
app.use(router) // 使用路由器
app.use(store)
app.component("v-chart",ECharts)
app.config.globalProperties.$echarts
// 统一注册 el-icon 图标
for (let iconName in ElIcons) {
    app.component(iconName, ElIcons[iconName],)
}
app.mount('#app')
